package aplicativo.conversor.util;

public class Calculos {

	public static double celsiusToFahrenheit(double c) {
		return (9 * c + 160) / 5;
	}

	public static double fahrenheitToCelsius(double f) {
		return (f - 32) * 5 / 9;
	}

	public static double metroToQuilometro(double m) {
		return m / 1000;
	}

	public static double quilometroToMetro(double q) {
		return q * 1000;
	}

	public static double milhasToQuilometro(double m) {
		return m * 1.6093;
	}

	public static double quilometroToMilha(double q) {
		return q / 1.6093;
	}

	public static double metrosToPes(double m) {
		return m * 3.28084;
	}

	public static double pesToMetro(double p) {
		return p / 3.28084;
	}

	public static String decimalToBinario(int d) {
		return Integer.toBinaryString(d);
	}

	public static String decimalToHexadecimal(int d) {
		return Integer.toHexString(d);
	}
	
}
